using System;
using Deepcode.Flux.Core.Extensions;
using Deepcode.Flux.Core.Extensions.Codons;

namespace Deepcode.Flux.Core.Codons.Asset
{
	/// <summary>
	/// Codon representing an association between a file extension and an icon
	/// <AssetIcon		id="iconDEFAULT"
    ///					extension=""
	///					icon="~/admin/private/asset/Img/icondefault.gif"/>
	/// </summary>
	[XmlCodonName("AssetIcon")]
	public class AssetIcon : AbstractCodon
	{
		[XmlCodonAttribute("extension")]
		private string ext = "";
		[XmlCodonAttribute("icon")]
		private string icon = "";


		public override object BuildItem(object owner, System.Collections.ArrayList subItems)
		{
			return new Deepcode.Flux.Core.Systems.Asset.AssetIcon( ext, icon );
		}
	}
}
